new Vue({
    el: '#other',
    data() {
        return {
            lenth: 0,
            tableData: '',
            lim: 2,
            page: 1,
            query: {
                type: '',
                area: '',
                salary: '',
                jobStartTime: '',
            },
            total1: 50,
            perWorkHour: '',
            jobStartTime: '',
            types: ['老师', '服务员', '外卖起手', '收银员', '快递'],
            areas: ['南岸', '渝中', '东南', '渝北', '弹子石']
        }
    },
    methods: {
        getData() {
            let that = this
            let cur = (this.page - 1) * this.lim
            let url = '/part_time_job/pageFind/' + cur + '/' + this.lim
            axios
                .post(url, that.query)
                .then(response => {
                    this.tableData = response.data.data.jobs;
                    this.total1 = 10 * (response.data.data.total1 / this.lim);
                    console.log(this.tableData)
                    this.$message({type: 'success', message: "由于数据太少，一页就放两条。" + '当前页为' + this.page});
                })
                .catch(function (error) { // 请求失败处理
                    console.log(error);
                });
        }, log() {
            console.log(this.type)
        },
    }
})